﻿<%@Page Language="C#" MasterPageFile="~/MasterPage.master"  AutoEventWireup="true" Inherits="_Default" Codebehind="Default.aspx.cs" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
        
    <!-- =================================================================================== TABLE san pham ban chay nhat ========================================= -->
    <asp:Table ID="TableHomePage" runat="server" BorderStyle="Dotted" Width="100%" 
        CellPadding="5" CellSpacing="5" GridLines="Both">
        
        <asp:TableHeaderRow ID="TableHeaderHomePage" runat="server" Width="100%"> 
            <asp:TableHeaderCell CssClass="Table_Header" ColumnSpan="3" runat="server" ID="TableHeaderCell1" Font-Bold="true" Width="100%">Sản phẩm bán chạy nhất</asp:TableHeaderCell>            
        </asp:TableHeaderRow>
            
        <asp:TableRow ID="TableRow1" runat="server">
            <asp:TableCell CssClass="table_data" ID="TableCell1" runat="server">
                <asp:ImageButton ID="ImgBtnSPBanChay1" runat="server" ImageUrl="~/Picture Computer/Computer.jpg" AlternateText="Computer 1" PostBackUrl="Products/detail.aspx" Width="50%" Height="50%" />                
                <br />
                <asp:HyperLink ID="HLinkSPBanChay1" runat="server" NavigateUrl="~/Products/detail.aspx"></asp:HyperLink>
                <br />
                <asp:Label ID="lSPMoiBanChay1" runat="server" CssClass="gia" ></asp:Label>
            </asp:TableCell>
            
            <asp:TableCell CssClass="table_data" ID="TableCell2" runat="server">
                <asp:ImageButton ID="ImgBtnSPBanChay2" runat="server" ImageUrl="~/Picture Computer/Computer.jpg" AlternateText="Computer 1" PostBackUrl="Products/detail.aspx" Width="50%" Height="50%"/>                
                <br />
                <asp:HyperLink ID="HLinkSPBanChay2" runat="server" NavigateUrl="~/Products/detail.aspx"></asp:HyperLink>
                <br />
                <asp:Label ID="lSPMoiBanChay2" runat="server" CssClass="gia" ></asp:Label>
            </asp:TableCell>
            
            <asp:TableCell CssClass="table_data" ID="TableCell3" runat="server">
                <asp:ImageButton ID="ImgBtnSPBanChay3" runat="server" ImageUrl="~/Picture Computer/Computer.jpg" AlternateText="Computer 1" PostBackUrl="Products/detail.aspx" Width="50%" Height="50%"/>                
                <br />
                <asp:HyperLink runat="server" NavigateUrl="~/Products/detail.aspx" ID="HLinkSPBanChay3"></asp:HyperLink>
                <br />
                <asp:Label ID="lSPMoiBanChay3" runat="server" CssClass="gia" ></asp:Label>
            </asp:TableCell>                        
        </asp:TableRow>
        <asp:TableRow ID="TableRow4" runat="server">
            <asp:TableCell CssClass="table_data" ID="TableCell10" runat="server">
                <asp:ImageButton ID="ImgBtnSPBanChay4" runat="server" ImageUrl="~/Picture Computer/Computer.jpg" AlternateText="Computer 1" PostBackUrl="Products/detail.aspx" Width="50%" Height="50%"/>                
                <br />
                <asp:HyperLink runat="server" NavigateUrl="~/Products/detail.aspx" ID="HLinkSPBanChay4"></asp:HyperLink>
                <br />
                <asp:Label ID="lSPMoiBanChay4" runat="server" CssClass="gia" ></asp:Label>
            </asp:TableCell>
            
            <asp:TableCell CssClass="table_data" ID="TableCell11" runat="server">
                <asp:ImageButton ID="ImgBtnSPBanChay5" runat="server" ImageUrl="~/Picture Computer/Computer.jpg" AlternateText="Computer 1" PostBackUrl="Products/detail.aspx" Width="50%" Height="50%"/>                
                <br />
                <asp:HyperLink runat="server" NavigateUrl="~/Products/detail.aspx" ID="HLinkSPBanChay5"></asp:HyperLink>
                <br />
                <asp:Label ID="lSPMoiBanChay5" runat="server" CssClass="gia" ></asp:Label>
            </asp:TableCell>
            
            <asp:TableCell CssClass="table_data" ID="TableCell12" runat="server">
                <asp:ImageButton ID="ImgBtnSPBanChay6" runat="server" ImageUrl="~/Picture Computer/Computer.jpg" AlternateText="Computer 1" PostBackUrl="Products/detail.aspx" Width="50%" Height="50%"/>                
                <br />
                <asp:HyperLink runat="server" NavigateUrl="~/Products/detail.aspx" ID="HLinkSPBanChay6"></asp:HyperLink>
                <br />
                <asp:Label ID="lSPMoiBanChay6" runat="server" CssClass="gia" ></asp:Label>
            </asp:TableCell>                        
        </asp:TableRow>
        
    </asp:Table>  
    
    <br />
    <hr size="2" style="border: thick double #800000" />
    <br />
    
    <!-- =================================================================================== TABLE San pham moi tren thi truong ========================================= -->
    <asp:Table ID="Table1" runat="server" BorderStyle="Dotted" Width="100%" 
        CellPadding="5" CellSpacing="5" GridLines="Both">
        
        <asp:TableHeaderRow ID="TableHeaderRow1" runat="server" Width="100%"> 
            <asp:TableHeaderCell CssClass="Table_Header" ColumnSpan="3" runat="server" ID="TableHeaderCell2" Font-Bold="true" Width="100%">S&#7843;n ph&#7849;m m&#7899;i trên th&#7883; tr&#432;&#7901;ng</asp:TableHeaderCell>            
        </asp:TableHeaderRow>
            
        <asp:TableRow ID="TableRow2" runat="server">
            <asp:TableCell CssClass="table_data" ID="TableCell4" runat="server">            
                <asp:ImageButton ID="ImgBtnSPMoi1" runat="server" ImageUrl="~/Picture Computer/Computer.jpg" AlternateText="Computer 1" PostBackUrl="Products/detail.aspx" Width="50%" Height="50%"/>                
                <br />
                <asp:HyperLink runat="server" NavigateUrl="~/Products/detail.aspx?ProductId=" ID="HLinkSPMoi1"></asp:HyperLink>
                <br />
                
                <asp:Image ImageUrl="~//images//new.gif" runat="server" />
                &nbsp;&nbsp;&nbsp;
                <asp:Label ID="lSPMoi1" runat="server" CssClass="gia" ></asp:Label>
            </asp:TableCell>
            
            <asp:TableCell CssClass="table_data" ID="TableCell5" runat="server">
                <asp:ImageButton ID="ImgBtnSPMoi2" runat="server" ImageUrl="~/Picture Computer/Computer.jpg" AlternateText="Computer 1" PostBackUrl="Products/detail.aspx" Width="50%" Height="50%"/>                
                <br />
                <asp:HyperLink runat="server" NavigateUrl="~/Products/detail.aspx" ID="HLinkSPMoi2"></asp:HyperLink>
                <br />
                <asp:Image ID="Image1" ImageUrl="~//images//new.gif" runat="server" />
                &nbsp;&nbsp;&nbsp;
                <asp:Label ID="lSPMoi2" runat="server" CssClass="gia" ></asp:Label>
            </asp:TableCell>
            
            <asp:TableCell CssClass="table_data" ID="TableCell6" runat="server">
                <asp:ImageButton ID="ImgBtnSPMoi3" runat="server" ImageUrl="~/Picture Computer/Computer.jpg" AlternateText="Computer 1" PostBackUrl="Products/detail.aspx" Width="50%" Height="50%"/>                
                <br />
                <asp:HyperLink runat="server" NavigateUrl="~/Products/detail.aspx" ID="HLinkSPMoi3"></asp:HyperLink>
                <br />
                <asp:Image ID="Image2" ImageUrl="~//images//new.gif" runat="server" />
                &nbsp;&nbsp;&nbsp;
                <asp:Label ID="lSPMoi3" runat="server" CssClass="gia" ></asp:Label>
            </asp:TableCell>                        
        </asp:TableRow>
        
        <asp:TableRow ID="TableRow5" runat="server">
            <asp:TableCell CssClass="table_data" ID="TableCell13" runat="server">
                <asp:ImageButton ID="ImgBtnSPMoi4" runat="server" ImageUrl="~/Picture Computer/Computer.jpg" AlternateText="Computer 1" PostBackUrl="Products/detail.aspx" Width="50%" Height="50%"/>                
                <br />
                <asp:HyperLink runat="server" NavigateUrl="~/Products/detail.aspx" ID="HLinkSPMoi4"></asp:HyperLink>
                <br />
                <asp:Image ID="Image3" ImageUrl="~//images//new.gif" runat="server" />
                &nbsp;&nbsp;&nbsp;
                <asp:Label ID="lSPMoi4" runat="server" CssClass="gia" ></asp:Label>
            </asp:TableCell>
            
            <asp:TableCell CssClass="table_data" ID="TableCell14" runat="server">
                <asp:ImageButton ID="ImgBtnSPMoi5" runat="server" ImageUrl="~/Picture Computer/Computer.jpg" AlternateText="Computer 1" PostBackUrl="Products/detail.aspx" Width="50%" Height="50%"/>                
                <br />
                <asp:HyperLink runat="server" NavigateUrl="~/Products/detail.aspx" ID="HLinkSPMoi5"></asp:HyperLink>
                <br />
                <asp:Image ID="Image4" ImageUrl="~//images//new.gif" runat="server" />
                &nbsp;&nbsp;&nbsp;
                <asp:Label ID="lSPMoi5" runat="server" CssClass="gia" ></asp:Label>
            </asp:TableCell>
            
            <asp:TableCell CssClass="table_data" ID="TableCell15" runat="server">
                <asp:ImageButton ID="ImgBtnSPMoi6" runat="server" ImageUrl="~/Picture Computer/Computer.jpg" AlternateText="Computer 1" PostBackUrl="Products/detail.aspx" Width="50%" Height="50%"/>                
                <br />
                <asp:HyperLink runat="server" NavigateUrl="~/Products/detail.aspx" ID="HLinkSPMoi6"></asp:HyperLink>
                <br />
                <asp:Image ID="Image5" ImageUrl="~//images//new.gif" runat="server" />
                &nbsp;&nbsp;&nbsp;
                <asp:Label ID="lSPMoi6" runat="server" CssClass="gia" ></asp:Label>
            </asp:TableCell>                        
        </asp:TableRow>
        
    </asp:Table> 
    
    <br />
    <hr size="2" style="border: thick double #800000" />
    <br />
    
    <!-- =================================================================================== TABLE San pham duoc yeu thich ========================================= -->
    
    <asp:Table ID="Table2" runat="server" BorderStyle="Dotted" Width="100%" 
        CellPadding="5" CellSpacing="5" GridLines="Both">
        
        <asp:TableHeaderRow ID="TableHeaderRow2" runat="server" Width="100%"> 
            <asp:TableHeaderCell CssClass="Table_Header" ColumnSpan="3" runat="server" ID="TableHeaderCell3" Font-Bold=true Width="100%">S&#7843;n ph&#7849;m &#273;&#432;&#7907;c yêu thích</asp:TableHeaderCell>            
        </asp:TableHeaderRow>
            
        <asp:TableRow ID="TableRow3" runat="server">
            <asp:TableCell CssClass="table_data" ID="TableCell7" runat="server">
                <asp:ImageButton ID="ImgBtnSPYeuThich1" runat="server" ImageUrl="~/Picture Computer/Computer.jpg" AlternateText="Computer 1" PostBackUrl="Products/detail.aspx" Width="50%" Height="50%"/>                
                <br />
                <asp:HyperLink runat="server" NavigateUrl="~/Products/detail.aspx" ID="HLinkSPYeuThich1"></asp:HyperLink>
                <br />
                <asp:Label ID="lSPYeuThich1" runat="server" CssClass="gia" ></asp:Label>
            </asp:TableCell>
            
            <asp:TableCell CssClass="table_data" ID="TableCell8" runat="server">
                <asp:ImageButton ID="ImgBtnSPYeuThich2" runat="server" ImageUrl="~/Picture Computer/Computer.jpg" AlternateText="Computer 1" PostBackUrl="Products/detail.aspx" Width="50%" Height="50%"/>                
                <br />
                <asp:HyperLink runat="server" NavigateUrl="~/Products/detail.aspx" ID="HLinkSPYeuThich2"></asp:HyperLink>
                <br />
                <asp:Label ID="lSPYeuThich2" runat="server" CssClass="gia" ></asp:Label>
            </asp:TableCell>
            
            <asp:TableCell CssClass="table_data" ID="TableCell9" runat="server">
                <asp:ImageButton ID="ImgBtnSPYeuThich3" runat="server" ImageUrl="~/Picture Computer/Computer.jpg" AlternateText="Computer 1" PostBackUrl="Products/detail.aspx" Width="50%" Height="50%"/>                
                <br />
                <asp:HyperLink runat="server" NavigateUrl="~/Products/detail.aspx" ID="HLinkSPYeuThich3"></asp:HyperLink>
                <br />
                <asp:Label ID="lSPYeuThich3" runat="server" CssClass="gia" ></asp:Label>
            </asp:TableCell>                        
        </asp:TableRow>
        
        <asp:TableRow ID="TableRow6" runat="server">
            <asp:TableCell CssClass="table_data" ID="TableCell16" runat="server">
                <asp:ImageButton ID="ImgBtnSPYeuThich4" runat="server" ImageUrl="~/Picture Computer/Computer.jpg" AlternateText="Computer 1" PostBackUrl="Products/detail.aspx" Width="50%" Height="50%"/>                
                <br />
                <asp:HyperLink runat="server" NavigateUrl="~/Products/detail.aspx" ID="HLinkSPYeuThich4"></asp:HyperLink>
                <br />
                <asp:Label ID="lSPYeuThich4" runat="server" CssClass="gia" ></asp:Label>
            </asp:TableCell>
            
            <asp:TableCell CssClass="table_data" ID="TableCell17" runat="server">
                <asp:ImageButton ID="ImgBtnSPYeuThich5" runat="server" ImageUrl="~/Picture Computer/Computer.jpg" AlternateText="Computer 1" PostBackUrl="Products/detail.aspx" Width="50%" Height="50%"/>                
                <br />
                <asp:HyperLink runat="server" NavigateUrl="~/Products/detail.aspx" ID="HLinkSPYeuThich5"></asp:HyperLink>
                <br />
                <asp:Label ID="lSPYeuThich5" runat="server" CssClass="gia" ></asp:Label>
            </asp:TableCell>
            
            <asp:TableCell CssClass="table_data" ID="TableCell18" runat="server">
                <asp:ImageButton ID="ImgBtnSPYeuThich6" runat="server" ImageUrl="~/Picture Computer/Computer.jpg" AlternateText="Computer 1" PostBackUrl="Products/detail.aspx" Width="50%" Height="50%"/>                
                <br />
                <asp:HyperLink runat="server" NavigateUrl="~/Products/detail.aspx" ID="HLinkSPYeuThich6"></asp:HyperLink>
                <br />
                <asp:Label ID="lSPYeuThich6" runat="server" CssClass="gia" ></asp:Label>
            </asp:TableCell>                        
        </asp:TableRow>
        
    </asp:Table> 
    
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                
        SelectCommand="SELECT TOP 6 SAN_PHAM.id, SAN_PHAM.TenSanPham, SAN_PHAM.Gia, HINH_ANH.Url FROM SAN_PHAM INNER JOIN HINH_ANH ON SAN_PHAM.id = HINH_ANH.idSanPham ORDER BY SAN_PHAM.NgayThemSP DESC" 
        onselecting="SqlDataSource1_Selecting">
    </asp:SqlDataSource>
    
    
</asp:Content>